package com.blrs.service.collection.impl;

import java.util.List;
import com.blrs.common.utils.DateUtils;
import com.blrs.service.collection.IIndexCollectionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.blrs.mapper.IndexCollectionMapper;
import com.blrs.domain.IndexCollection;

/**
 * 首页收藏夹Service业务层处理
 * 
 * @author xiaoyang
 * @date 2024-07-31
 */
@Service
public class IndexCollectionServiceImpl implements IIndexCollectionService
{
    @Autowired
    private IndexCollectionMapper indexCollectionMapper;

    /**
     * 查询首页收藏夹
     * 
     * @param id 首页收藏夹主键
     * @return 首页收藏夹
     */
    @Override
    public IndexCollection selectIndexCollectionById(String id)
    {
        return indexCollectionMapper.selectIndexCollectionById(id);
    }

    /**
     * 查询首页收藏夹列表
     * 
     * @param indexCollection 首页收藏夹
     * @return 首页收藏夹
     */
    @Override
    public List<IndexCollection> selectIndexCollectionList(IndexCollection indexCollection)
    {
        return indexCollectionMapper.selectIndexCollectionList(indexCollection);
    }

    /**
     * 新增首页收藏夹
     * 
     * @param indexCollection 首页收藏夹
     * @return 结果
     */
    @Override
    public int insertIndexCollection(IndexCollection indexCollection)
    {
        indexCollection.setCreateTime(DateUtils.getNowDate());
        return indexCollectionMapper.insertIndexCollection(indexCollection);
    }

    /**
     * 修改首页收藏夹
     * 
     * @param indexCollection 首页收藏夹
     * @return 结果
     */
    @Override
    public int updateIndexCollection(IndexCollection indexCollection)
    {
        return indexCollectionMapper.updateIndexCollection(indexCollection);
    }

    /**
     * 批量删除首页收藏夹
     * 
     * @param ids 需要删除的首页收藏夹主键
     * @return 结果
     */
    @Override
    public int deleteIndexCollectionByIds(Long[] ids)
    {
        return indexCollectionMapper.deleteIndexCollectionByIds(ids);
    }

    /**
     * 删除首页收藏夹信息
     * 
     * @param id 首页收藏夹主键
     * @return 结果
     */
    @Override
    public int deleteIndexCollectionById(Long id)
    {
     return 0;
    }
}
